﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserUpdate.aspx.cs" Inherits="Main_UserUpdate" %>

<%@ Register src="../top.ascx" tagname="top" tagprefix="uc1" %>
<%@ Register src="../bottom.ascx" tagname="bottom" tagprefix="uc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title><%=   ConfigurationSettings.AppSettings["title"]   %>-用户信息修改</title>
	<meta name="Keywords" content="<%=   ConfigurationSettings.AppSettings["Keywords"]   %>" />
    <meta name="description" content="<%=   ConfigurationSettings.AppSettings["description"]   %>" />
    <link href="../css/header/header.css" rel="stylesheet" type="text/css" />
    <link href="../css/footer/footer.css" rel="stylesheet" type="text/css" />
    <link href="../css/register/register.css" rel="stylesheet" type="text/css" /> 
    
<script language="javascript" type="text/javascript">

function btnback_onclick() {
    window.history.go(-1);
}

function document.onkeydown()
{
var e=event.srcElement;
if(event.keyCode==13)
{
document.getElementById("btnupdate").click();
return false;
}
}
</script>

    <style type="text/css">


.btngrey{border-style: none;
            border-color: inherit;
            border-width: 0;
            background: #f5f5f5 url('../css/shop/btngreybg.png') no-repeat;
            color:#333;     font:bold 14px 微软雅黑;     width:100px;     height:20px
        }
    </style>

</head>
<body>
    <form id="form1" runat="server">
    <uc1:top ID="top1" runat="server" />
    <div id="registerbody">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <table>
        <tr>
            <td colspan="2">
                <h1>▶ 修改我的资料</h1>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <h2>
                    昵称：</h2>
            </td>
            <td>
                <asp:TextBox ID="txtnickname" runat="server" CssClass="textbox" Width="150px"></asp:TextBox>
            </td>
            <td>
                <asp:RegularExpressionValidator ID="revnickname" runat="server" 
                    ControlToValidate="txtnickname" ErrorMessage="* 不能含有空格且长度为1-15位" 
                    Font-Size="Small" ValidationExpression="[^ ]{1,15}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                <h2>电子邮箱：</h2>
                        </td>
            <td>
                <asp:TextBox ID="txtemail" runat="server" CssClass="textbox"></asp:TextBox>
           </td>
            <td>
                <asp:RegularExpressionValidator ID="revemail" runat="server" 
                    ControlToValidate="txtemail" ErrorMessage="* 电子邮箱输入不正确" Font-Size="Small" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                <h2>性别：</h2>
                        </td>
            <td>
                &nbsp;<asp:DropDownList ID="ddlsex" runat="server">
                    <asp:ListItem Value="--请选择--">--请选择--</asp:ListItem>
                    <asp:ListItem Value="男">男</asp:ListItem>
                    <asp:ListItem Value="女">女</asp:ListItem>
                </asp:DropDownList>
           </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <h2>真实姓名：</h2>
                        </td>
            <td>
                <asp:TextBox ID="txttruename" runat="server" CssClass="textbox"></asp:TextBox>
                        </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <h2>身份证号：</h2>
                        </td>
            <td>
                <asp:TextBox ID="txtidcard" runat="server" CssClass="textbox"></asp:TextBox>
                        </td>
            <td>
                <asp:RegularExpressionValidator ID="revidcard" runat="server" 
                    ControlToValidate="txtidcard" ErrorMessage="* 身份证号输入不正确" Font-Size="Small" 
                    ValidationExpression="\d{17}[\d|X]|\d{15}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                <h2>手机号：</h2>
                        </td>
            <td>
                <asp:TextBox ID="txtphone" runat="server" CssClass="textbox"></asp:TextBox>
                        </td>
            <td>
                <asp:RegularExpressionValidator ID="revphone" runat="server" 
                    ControlToValidate="txtphone" ErrorMessage="* 手机号输入不正确" Font-Size="Small" 
                    ValidationExpression="(\d{3}-\d{8}|\d{4}-\d{7})|(^\d{8,13}(?:;\d{8,13})*$)"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                <h2>
                    固定电话：</h2>
            </td>
            <td>
                <asp:TextBox ID="txttel" runat="server" CssClass="textbox"></asp:TextBox>
            </td>
            <td>
                <asp:RegularExpressionValidator ID="revtel" runat="server" 
                    ControlToValidate="txttel" ErrorMessage="* 电话号输入不正确" Font-Size="Small" 
                    ValidationExpression="(\d{3}-\d{8}|\d{4}-\d{7})|(^\d{8,13}(?:;\d{8,13})*$)"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                <h2>
                    地址：</h2>
            </td>
            <td>
                <asp:TextBox ID="txtaddress" runat="server" CssClass="textbox" Width="207px"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <h2>
                    QQ号码：</h2>
            </td>
            <td>
                <asp:TextBox ID="txtqq" runat="server" CssClass="textbox"></asp:TextBox>
            </td>
            <td>
                <asp:RangeValidator ID="rvqq" runat="server" ControlToValidate="txtqq" 
                    ErrorMessage="* QQ号码输入不正确" Font-Size="Small" MaximumValue="9999999999" 
                    MinimumValue="10000" Type="Double"></asp:RangeValidator>
            </td>
        </tr>
        <tr>
            <td>
                <h2>
                    MSN：</h2>
            </td>
            <td>
                <asp:TextBox ID="txtmsn" runat="server" CssClass="textbox"></asp:TextBox>
            </td>
            <td>
                <asp:RegularExpressionValidator ID="revmsn" runat="server" 
                    ControlToValidate="txtmsn" ErrorMessage="* MSN输入不正确" Font-Size="Small" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                <h2>
                    个性签名：</h2>
            </td>
            <td>
                <asp:TextBox ID="txtsign" runat="server" CssClass="textbox" Width="207px"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <h2>请输入验证码：</h2>
            </td>
            <td>
            <asp:TextBox ID="txtVail" runat="server" Width="60px" CssClass="textbox" style=" display:inline" ></asp:TextBox><a href="Register.aspx"><img src="../ValidateCode.aspx" alt="看不清请点击图片" id="IMG1" /></a>
            </td>
            <td>
                &nbsp;</td>
        </tr>

        <tr>
            <td colspan="2" style="text-align:center">
                <asp:Button ID="btnupdate" runat="server" CssClass="loginbtn" 
                    OnClick="btnupdate_Click" Text="修改资料" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input class="btngrey" onclick="return btnback_onclick()" type="button" 
                    value="返回" /></td>
            <td style="text-align:center">
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="2">
                <h1>
                    ▶ 修改我的密码</h1>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <h2>
                    请输入原密码：</h2>
            </td>
            <td>
                <asp:TextBox ID="txtoldpwd" runat="server" CssClass="textbox" 
                    TextMode="Password"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <h2>
                    请输入新密码：</h2>
            </td>
            <td>
                <asp:TextBox ID="txtpwd" runat="server" CssClass="textbox" TextMode="Password"></asp:TextBox>
            </td>
            <td>
                <asp:RegularExpressionValidator ID="revpwd" runat="server" 
                    ControlToValidate="txtpwd" ErrorMessage="密码至少6位" Font-Size="Small" 
                    ValidationExpression="^.{6,18}$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                <h2>
                    再次输入新密码：</h2>
            </td>
            <td>
                <asp:TextBox ID="txtpwdagain" runat="server" CssClass="textbox" 
                    TextMode="Password"></asp:TextBox>
            </td>
            <td>
                <asp:CompareValidator ID="cvpwd" runat="server" ControlToCompare="txtpwd" 
                    ControlToValidate="txtpwdagain" ErrorMessage="两次密码不一致" Font-Size="Small"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align:center">
                <asp:Button ID="btnupdatepwd" runat="server" CssClass="loginbtn" 
                    OnClick="btnupdatepwd_Click" Text="修改密码" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input class="btngrey" onclick="return btnback_onclick()" type="button" 
                    value="返回" /></td>
            <td style="text-align:center">
                &nbsp;</td>
        </tr>

    </table>
    </ContentTemplate>
    </asp:UpdatePanel>
    </div>
        <uc2:bottom ID="bottom1" runat="server" />
    </form>
</body>
</html>
